Hybris Sales UX API icon

Hybris Sales UX API

(0 reviews)

billingAccount - TMF-666 POST

This API allows the client to create a billing account entity.

URL

https://[localhost]:[port]/ecom-sales-ux/v1/{businessId}/billingAccount

URL PARAMS

nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit.Y
namevaluedescriptionrequired
client_idstringThe client_id identifying the channel.Y
client_secretstringPassword associated with the client_id.Y
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server.
Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction.
Y

Request

curl --location 'https://nonprod.esb.cloud.lla.com/dev/ecom-sales-ux/ecom-sales-ux/v1/PR/billingAccount' \
--header 'client_id: abcd' \
--header 'client_secret: 12345' \
--header 'X-Correlation-ID: 5478-asdf5454-sad545-sear545dsf-54e5d4g' \
--header 'Content-Type: application/json' \
--data '{
    "accountType": "B2C",
    "ratingType": "Prepaid",
    "name": "Noah White",
    "relatedParty": [
        {
            "name": "IVR",
            "role": "Sales channel",
            "@relatedType": "Channel"
        }
    ],
    "billStructure": {
        "presentationMedia": [
            {
                "name": "eBillDisabled"
            }
        ]
    },
    "characteristic": [
        {
            "value": "false",
            "name": "autoPaymentEnabled"
        },
        {
            "value": "EN",
            "name": "preferredLanguage"
        }
    ],
    "contact": [
        {
            "contactMedium": [
                {
                    "preferred": true,
                    "characteristic": {
                        "city": "Guaynabo",
                        "country": "US",
                        "postCode": "00969",
                        "stateOrProvince": "PR",
                        "street1": "35 Avenida Juan Carlos de Borbon",
                        "phoneNumber": "1111111111",
                        "emailAddress": "sergio.mahecha@cwc.com"
                    }
                }
            ],
            "relatedParty": {
                "id": "0039990",
                "@type": "CustomerAccountRef"
            }
        }
    ],
    "@type": "BillingAccount"
}'
Definitions

Each of the request parameters is detailed.

nametypedescriptionrequired
accountTypestringaccount type of the customer
B2C
B2B
Y
ratingTypestringPrepaid
Postpaid
Y
namestringFirst name & Last name of the customer
Eg: "name": "Noah White"
Y
relatedPartyarrayA list of related partiesY
relatedParty.namestringSource System information for tracking purpose:
IVR
Digital
RAFM & so on
Y
relatedParty.rolestringRole of the partyN
relatedParty.@relatedTypestringRelated party typeY
billStructureobjectThe structure of the bill for party accounts (billing or settlement).N
billStructure.presentationMediaarrayA list of bill presentation media ref or valuesN
billStructure.presentationMedia.namestringebill flag enabled/disabled
'eBillDisabled'
'eBillEnabled'
N
contactarrayA list of contactsY
contact.contactMediumarrayA list of contact mediumsY
contact.contactMedium.preferredbooleanIf true, indicates that is the preferred contact mediumN
contact.contactMedium.characteristicobjectA medium characteristic, Any additional characteristic(s) of this contact mediumY
contact.contactMedium.characteristic.citystringThe city.Y
contact.contactMedium.characteristic.countrystringThe countryY
contact.contactMedium.characteristic.postCodestringPostcodeY
contact.contactMedium.characteristic.stateOrProvincestringState or province.Y
contact.contactMedium.characteristic.street1stringDescribes the street.Y
contact.contactMedium.characteristic.phoneNumberstringThe primary phone number of the contact.Y
contact.contactMedium.characteristic.emailAddressstringFull email address in standard format.Y
contact.relatedPartyarrayA list of related partiesY
contact.relatedParty.idstringcustomer account numberY
contact.relatedParty.@typestringrelatedParty referenceY
characteristicarraylist of characteristicY
characteristic.namestringName of the characteristicY
characteristic.valuestringValue of the characteristicY
@typeStringWhen sub-classing, this defines the sub-class entity nameN
characteristic values
nametypedescriptionrequired
autoPaymentEnabledstringautopay flag true or falseN
preferredLanguagestringpreferred language by the customer for communication
EN
ES & so on
N

Possible response success

This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.

[ 201 ]

OK - Create billing account request processed successfully, response body contains an entity corresponding to the requested resource.

{
    "id": "0039947",
    "relatedParty": [
        {
            "id": "0014C00000pP3EhQAK",
            "@type": "SalesforceInternalBillingAccountRef"
        },
        {
            "name": "IVR",
            "role": "Sales channel",
            "@relatedType": "Channel"
        }
    ],
    "accountType": "B2C",
    "ratingType": "Prepaid",
    "name": "Noah White",
    "billStructure": {
        "presentationMedia": [
            {
                "name": "eBillDisabled"
            }
        ]
    },
    "characteristic": [
        {
            "value": "false",
            "name": "autoPaymentEnabled"
        },
        {
            "value": "EN",
            "name": "preferredLanguage"
        }
    ],
    "contact": [
        {
            "contactMedium": [
                {
                    "preferred": true,
                    "characteristic": {
                        "city": "Guaynabo",
                        "country": "US",
                        "postCode": "00969",
                        "stateOrProvince": "PR",
                        "street1": "35 Avenida Juan Carlos de Borbon",
                        "phoneNumber": "1111111111",
                        "emailAddress": "sergio.mahecha@cwc.com"
                    }
                }
            ],
            "relatedParty": {
                "id": "0039947",
                "@type": "CustomerAccountRef"
            }
        }
    ],
    "@type": "BillingAccount"
}
Definitions

Each of the request parameters is detailed.

nametypedescriptionrequired
idstringBilling Account NumberN
accountTypestringaccount type of the customer
B2C
B2B
N
ratingTypestringPrepaid
Postpaid
N
namestringFirst name & Last name of the customer
Eg: "name": "Noah White"
N
relatedPartyarrayA list of related partiesN
relatedParty.namestringSource System information for tracking purpose:
IVR
Digital
RAFM & so on
N
relatedParty.rolestringRole of the partyN
relatedParty.idSalesforce Internal Billing Account IdN
relatedParty.@typeReference typeN
relatedParty.@relatedTypestringRelated party typeN
billStructureobjectThe structure of the bill for party accounts (billing or settlement).N
billStructure.presentationMediaarrayA list of bill presentation media ref or valuesN
billStructure.presentationMedia.namestringebill flag true or false
Note - if the value will be 'eBillDisabled' then mapping to SF the ebill flag as 'false'
if the value will be 'eBillEnabled' then mapping to SF the ebill flag as 'true'
N
contactarrayA list of contactsN
contact.contactMediumarrayA list of contact mediumsN
contact.contactMedium.preferredbooleanIf true, indicates that is the preferred contact mediumN
contact.contactMedium.characteristicobjectA medium characteristic, Any additional characteristic(s) of this contact mediumN
contact.contactMedium.characteristic.citystringThe city.N
contact.contactMedium.characteristic.countrystringThe countryN
contact.contactMedium.characteristic.postCodestringPostcodeN
contact.contactMedium.characteristic.stateOrProvincestringState or province.N
contact.contactMedium.characteristic.street1stringDescribes the street.N
contact.contactMedium.characteristic.phoneNumberstringThe primary phone number of the contact.N
contact.contactMedium.characteristic.emailAddressstringFull email address in standard format.N
contact.relatedPartyarrayA list of related partiesN
contact.relatedParty.idstringcustomer account numberN
contact.relatedParty.@typestringrelatedParty referenceN
characteristicarraylist of characteristic, refer the characteristic table for more info.N
characteristic.namestringName of the characteristicN
characteristic.valuestringValue of the characteristicN
@typeStringWhen sub-classing, this defines the sub-class entity nameN

Possible response error

In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
    "errors": [
        {
            "code": 400,
            "message" : "SF:CREATE_BILLINGACCOUNT",
            "description" : "Ebill already enabled for the customer"
        }
    ]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [{
      "code" : 401,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }]
}
[ 403 ]

Forbidden - Indicates that the server understood the request but refuses to fulfill it. If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client SHOULD NOT automatically repeat the request with the same credentials. The client MAY repeat the request with new or different credentials.

[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{
      "code" : 404,
      "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method PATCH not allowed for : /{businessId}/billingAccount"
        }]
}
[ 429 ]

Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.

{
  "errors" : [{

      "code" : 429,
       "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "The request failed due to an internal error.",
      "description": "error description"
    }]
}
[ 501 ]

Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

{
  "errors" : [{
      "code" : 501,
      "message" : "LLA:NOT_IMPLEMENTED",
      "description" : "Operation POST /billingAccount for Business Id: xxxx not implemented"
    }]
  }
[ 502]

Bad Gateway - gateway is available but backend service is not. The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.

[ 503 ]

Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.

    Retry-After: 120

Reviews